onbreak {resume}
transcript on

set PrefMain(saveLines) 50000
.main clear

if {[file exists rtl_work]} {
	vdel -lib rtl_work -all
}
vlib rtl_work
vmap work rtl_work

# load designs

# insert files specific to your design here

vlog -sv -work rtl_work convert_hex_to_seven_segment.v
vlog -sv -work rtl_work VGA_Controller.v
vlog -sv -work rtl_work PB_Controller.v
vlog -sv -work rtl_work +define+SIMULATION SRAM_Controller.v
vlog -sv -work rtl_work tb_SRAM_Emulator.v
vlog -sv -work rtl_work +define+SIMULATION UART_Receive_Controller.v
vlog -sv -work rtl_work VGA_SRAM_interface.v
vlog -sv -work rtl_work UART_SRAM_interface.v
vlog -sv -work rtl_work Clock_100_PLL.v
vlog -sv -work rtl_work project.v
vlog -sv -work rtl_work tb_project.v
vlog -sv -work rtl_work InC.v
vlog -sv -work rtl_work Interpolation.v
vlog -sv -work rtl_work Mul32.v
vlog -sv -work rtl_work Even_Colour_Space_Conv.v
vlog -sv -work rtl_work Odd_Colour_Space_Conv.v


# specify library for simulation
vsim -t 100ps -L altera_mf_ver -lib rtl_work tb_project

# Clear previous simulation
restart -f

view wave
add wave Clock_50
#add wave -hexadecimal SRAM_address
#add wave -hexadecimal SRAM_data_io

########################################################
# Project module
########################################################
add wave uut/top_state
#add wave -hexadecimal uut/SRAM_address
#add wave -hexadecimal uut/SRAM_read_data
#add wave -hexadecimal uut/SRAM_write_data

########################################################
# InC module
########################################################
add wave uut/InC_unit/state
add wave uut/InC_unit/substate
add wave -unsigned uut/InC_unit/column
add wave -unsigned uut/InC_unit/row
add wave uut/InC_unit/start
add wave uut/InC_unit/finish
add wave -hexadecimal uut/InC_unit/SRAM_Addr
add wave -hexadecimal uut/InC_unit/SRAM_Data
add wave -hexadecimal uut/InC_unit/SRAM_Write
add wave uut/InC_unit/we
add wave -hexadecimal uut/InC_unit/R_out_buf
add wave -hexadecimal uut/InC_unit/G_out_buf
add wave -hexadecimal uut/InC_unit/B_out_buf
add wave -hexadecimal uut/InC_unit/U_in_buf
add wave -hexadecimal uut/InC_unit/V_in_buf
add wave -hexadecimal uut/InC_unit/U_out_buf
add wave -hexadecimal uut/InC_unit/V_out_buf
add wave -hexadecimal uut/InC_unit/Y_reg
add wave -hexadecimal uut/InC_unit/UR
add wave -hexadecimal uut/InC_unit/VR

# run complete simulation
run -all

destroy .structure
destroy .signals
destroy .source

simstats
